package bg.btanev.eightyfour.repository.impl;

import java.util.List;

import bg.btanev.eightyfour.dao.GenericDAO;
import bg.btanev.eightyfour.domain.experience.EducationExperience;
import bg.btanev.eightyfour.domain.experience.WorkExperience;
import bg.btanev.eightyfour.repository.ExperienceRepository;

/**
 *
 * @author B.Tanev
 *
 */
public class ExperienceRepositoryImpl implements ExperienceRepository {
	private GenericDAO<Long, WorkExperience> workExperienceDAO;
	private GenericDAO<Long, EducationExperience> educationExperienceDAO;

	public ExperienceRepositoryImpl() {
	}

	public void setWorkExperienceDAO(GenericDAO<Long, WorkExperience> workExperienceDAO) {
		this.workExperienceDAO = workExperienceDAO;
	}

	public void setEducationExperienceDAO(GenericDAO<Long, EducationExperience> educationExperienceDAO) {
		this.educationExperienceDAO = educationExperienceDAO;
	}

	@Override
	public List<EducationExperience> findAllEducationExperiences() {
		return educationExperienceDAO.findAll(false);
	}

	@Override
	public List<WorkExperience> findAllWorkExperiences() {
		return workExperienceDAO.findAll(false);
	}
}
